#ifndef TALKWINDOW_H
#define TALKWINDOW_H

#include <QWidget>
#include <QCloseEvent>
#include <QShortcut>
#include "ui_talkwindow.h"
#include "talkwinstatus.h"
#include "../QCommon/events.h"
#include "../QCommon/user.h"

class TalkWindow : public QWidget
{
    Q_OBJECT
public:
    TalkWindow(User& counterpart, QWidget* parent = 0);
    ~TalkWindow();
    void showCounterpartMsg(QString& msg);
private:
    Ui::TalkWindow *ui;
    User counterpart;
    QShortcut *sc_send;
    QString counterpart_name;
    QString counterpart_ip;
    Gender counterpart_gender;
    void closeEvent(QCloseEvent* event);
    QString getCurrTime();
private slots:
    void showMyMsg();
    void send_file();
};

#endif // TALKWINDOW_H
